package com.hou.liunx.controller;

import com.hou.liunx.User;
import com.hou.liunx.repository.UserRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class UserController {
    @Autowired
    UserRepository userRepository;
    @GetMapping("find")
    public List<User> find() {
        return userRepository.findAll();
    }
}
